﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DBFile.WebApp._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        Upload a file:
        <asp:FileUpload ID="fuUpload" runat="server" />
        <asp:Button ID="btnSaveButton" runat="server" Text="Upload File" OnClick="UploadFileClick" />
    </div>
    <div>
        List of files in repository:
        <asp:Button ID="btnRefresh" runat="server" Text="Refresh" OnClick="RefreshClick" />
        <asp:GridView ID="gvFiles" runat="server" AutoGenerateColumns="false" 
            OnRowDeleting="gvFiles_RowDeleting">
            <Columns>
                <asp:CommandField ShowDeleteButton="true" />
                <asp:TemplateField HeaderText="Filename" ItemStyle-HorizontalAlign="Center" >
                    <ItemTemplate>
                        <a href='<%# Container.DataItem.ToString() %>' target="_blank"><%# Container.DataItem.ToString() %></a>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </form>
</body>
</html>
